package org.example.excel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;

import java.util.ArrayList;
import java.util.List;

public class MaterialExcelReadListener implements ReadListener<MaterialExcel> {

    List<MaterialExcel> list;

    public MaterialExcelReadListener() {
        list = new ArrayList<MaterialExcel>();
    }

    @Override
    public void invoke(MaterialExcel materialExcel, AnalysisContext analysisContext) {
        list.add(materialExcel);
    }

    public List<MaterialExcel> getList() {
        return list;
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
